let dialogComponent = {
    template: `
        <div class="dialog ui-dialog" :class="config.showState?'show':''">
        
          <div class="ui-dialog-cnt">
            <div class="ui-dialog-bd">
              <h3>{{ config.title }}</h3>
              <p>{{ config.content }}</p>
            </div>
            <div class="ui-dialog-ft">
              <button type="button" :style="config.cancelStyle|| {}" data-role="button" @click="cancel">{{ config.cancelText }}</button>
              <button type="button" :style="config.confirmStyle || {}" data-role="button" class="btn-recommand" @click="confirm">{{ config.confirmText }}</button>
            </div>
          </div>
        </div>
    `,
    name: 'Dialog',
    props:['config'],
    data() {
        return {

        }
    },
    created() {

    },
    destroyed() {

    },

    methods: {
        cancel(){
            this.config.showState = false
            this.config.cancelBack()
        },
        confirm(){
            this.config.showState = false
            this.config.confirmBack()
        }
    }
}


